import Vue from 'vue'
import Router from 'vue-router'
import layout from '@/components/layout.vue'
import view from '@/components/view.vue'

Vue.use(Router)

export default new Router({
	// mode: 'history',
	base: process.env.BASE_URL,
	routes: [
		{
			path: '/',
			component: layout,
			children:[
				// 学生管理
				{
					path: '/',
					component: () => import('@/pages/student/list')
				},
				// 班级管理
				{
					path: '/class',
					component: () => import('@/pages/class/list')
				},
			]
		},
		//登录
		{
			path:'/login',
			component: () => import("@/pages/login/index"),
		},
		//404
		{
			path:'*',
			component: () => import("@/pages/404/index"),
		}
	]
})
